home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10623 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: operator % - compiler error
  5. Date: 18 Mar 1996 18:21:39 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4ikumj$7ub@solutions.solon.com>
  8. References: <4ihuuh$6ul@hatathli.csulb.edu> <DoH503.Hu7@iquest.net>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <DoH503.Hu7@iquest.net>, Doug Miller <dlmiller@iquest.net> wrote:
  12. >+x=663608941*y%pow(2,32)  /*I want remainder*/
  13.  
  14. >Hard to say for sure what caused the error, as you have not posted the
  15. >declarations of x and y.
  16.  
  17. Nonsense; % is not defined on doubles, like the return from pow.
  18.  
  19. >But here are some suggestions. Remember that * is the indirection operator,
  20. >as well as the
  21. >multiplication operator; try putting spaces before and after the * so the
  22. >compiler knows what
  23. >you mean.
  24.  
  25. This is, no offense, stupid and meaningless.  It has nothing to do
  26. with anything.  The spaces *CANNOT* disambiguate, because there are
  27. no cases in which it is ambiguous whether a * is a multiply or
  28. dereference operator.
  29.  
  30. Please take the time to learn the language, *THEN* post answers.
  31.  
  32. >Do the same with the % operator.  And remember you need a
  33. >semicolon at the end of your statement.
  34.  
  35. The % operator likewise doesn't care about spaces.  But yes, semicolons
  36. help.
  37.  
  38. -s
  39. -- 
  40. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  41. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  42. FUCK the communications decency act.  Goddamned government.  [literally.]
  43. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  44.